Skip to content

Conversation

@matiasAS
Copy link
Contributor

This PR adds a Dockerfile to run PyFRC2G in a container with the Graphviz dot
binary installed, avoiding host system dependencies.

No code changes included.

@olivierb46 olivierb46 self-assigned this Dec 30, 2025
@matiasAS
Copy link
Contributor Author

@olivierb46 adding a usage example for the Docker image in case it is useful.

As a usage example, the container can be executed like this:

docker run --rm \
  -e PFS_BASE_URL=<PFS_BASE_URL> \
  -e PFS_TOKEN=<PFS_TOKEN> \
  -v $(pwd)/results:/app/results \
  pyfrc2g

This runs PyFRC2G inside the container without requiring Graphviz or other system dependencies to be installed on the host.

The results directory will be created on the host if it does not already exist, and all generated output will be written there.

Environment variables are passed at runtime to avoid hardcoding sensitive credentials.

@olivierb46
Copy link
Owner

olivierb46 commented Dec 31, 2025

hi @matiasAS ,

Thank you very much for your contribution. I tested it yesterday (without environment variables for now) and have a few comments:

  • You need to use the requirements.txt file to install the Python libraries.
  • The Docker container should not run as root by default. It's Ok if we use this option --user $(id -u):$(id -g) but I think it needs to be more secure.
  • -v $(pwd)/results:/app/results causes a permission error with the --user option, or it does not produce any files without this option. I had to specify -v $(pwd):/app instead.

Thanks again ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants